package com.lq.mytool.strategy;

import com.alibaba.fastjson.JSON;
import com.lq.mytool.common.BaseBusinessException;
import com.lq.mytool.enums.AttendancePunchWayTypeEnum;
import com.lq.mytool.strategy.dto.PlacePunchWayDTO;
import com.lq.mytool.strategy.dto.WifiPunchWayDTO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;

/**
 * <p>
 *
 * </p>
 *
 * @author Nydia
 * @menu
 * @since 2022/2/1
 */
@Component
public class WifiPunchWay implements PunchWayStrategy{
    @Override
    public void checkParam(String jsonPunchWay) {
        WifiPunchWayDTO wifiPunchWayDTO = JSON.parseObject(jsonPunchWay, WifiPunchWayDTO.class);
        if (StringUtils.isEmpty(wifiPunchWayDTO.getWifiName())) {
            throw new BaseBusinessException("wifi not null");
        }
    }

    @Override
    public AttendancePunchWayTypeEnum getPunchWayType() {
        return AttendancePunchWayTypeEnum.WIFI_PUNCH_WAYS;
    }

    @Override
    public <T> void getReturnParam() {

    }
}
